package com.corpcredit.model;

// Generated Jul 22, 2008 11:56:54 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * WylQz generated by hbm2java
 */
@Entity
@Table(name = "wyl_qz")
public class WylQz implements java.io.Serializable
{

    private Long id;
    private int version;
    private String username;
    private String operation;
    private Date optdate;
    private String qzid;
    private String qssj;
    private String jb;
    private Set<WylQzqy> wylQzqies = new HashSet<WylQzqy>( 0 );

    public WylQz()
    {
    }

    public WylQz( Long id, String qzid, String qssj, String jb )
    {
        this.id = id;
        this.qzid = qzid;
        this.qssj = qssj;
        this.jb = jb;
    }

    public WylQz( Long id,
                  String username,
                  String operation,
                  Date optdate,
                  String qzid,
                  String qssj,
                  String jb,
                  Set<WylQzqy> wylQzqies )
    {
        this.id = id;
        this.username = username;
        this.operation = operation;
        this.optdate = optdate;
        this.qzid = qzid;
        this.qssj = qssj;
        this.jb = jb;
        this.wylQzqies = wylQzqies;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    @GeneratedValue(strategy=GenerationType.AUTO)
    public Long getId()
    {
        return this.id;
    }

    public void setId( Long id )
    {
        this.id = id;
    }

    @Version
    @Column(name = "version", nullable = false)
    public int getVersion()
    {
        return this.version;
    }

    public void setVersion( int version )
    {
        this.version = version;
    }

    @Column(name = "username", length = 50)
    public String getUsername()
    {
        return this.username;
    }

    public void setUsername( String username )
    {
        this.username = username;
    }

    @Column(name = "operation", length = 20)
    public String getOperation()
    {
        return this.operation;
    }

    public void setOperation( String operation )
    {
        this.operation = operation;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "optdate", length = 23)
    public Date getOptdate()
    {
        return this.optdate;
    }

    public void setOptdate( Date optdate )
    {
        this.optdate = optdate;
    }

    @Column(name = "qzid", nullable = false, length = 10)
    public String getQzid()
    {
        return this.qzid;
    }

    public void setQzid( String qzid )
    {
        this.qzid = qzid;
    }

    @Column(name = "qssj", nullable = false, length = 4)
    public String getQssj()
    {
        return this.qssj;
    }

    public void setQssj( String qssj )
    {
        this.qssj = qssj;
    }

    @Column(name = "jb", nullable = false, length = 10)
    public String getJb()
    {
        return this.jb;
    }

    public void setJb( String jb )
    {
        this.jb = jb;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "wylQz")
    public Set<WylQzqy> getWylQzqies()
    {
        return this.wylQzqies;
    }

    public void setWylQzqies( Set<WylQzqy> wylQzqies )
    {
        this.wylQzqies = wylQzqies;
    }

}
